package my.mall.db.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDate;

/**
 * <p>
 * 后台管理员表
 * </p>
 *
 * @author fengbo
 * @since 2024-05-11
 */
@TableName("mall_admin")
class Admin {

    @TableId(value = "id", type = IdType.AUTO)
    var id: Long? = null

    /**
     * 电话号
     */
    var phoneNum: Long? = null

    var nickName: String? = null

    /**
     * 密码
     */
    var password: String? = null

    /**
     * 连续登陆失败次数
     */
    var failedNum: Byte? = null

    /**
     * 登陆失败时间
     */
    var failedDate: LocalDate? = null

    var adminStatus: Byte? = null

    companion object {

        const val ID : String = "id"


        const val PHONE_NUM : String = "phone_num"


        const val NICK_NAME : String = "nick_name"


        const val PASSWORD : String = "password"


        const val FAILED_NUM : String = "failed_num"


        const val FAILED_DATE : String = "failed_date"


        const val ADMIN_STATUS : String = "admin_status"

    }

    override fun toString(): String {
        return "Admin{" +
        "id=" + id +
        ", phoneNum=" + phoneNum +
        ", nickName=" + nickName +
        ", password=" + password +
        ", failedNum=" + failedNum +
        ", failedDate=" + failedDate +
        ", adminStatus=" + adminStatus +
        "}"
    }
}
